<template>
    <view :style="themeColor">
        <view class="page" >
          <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
             <block slot="content">签到</block>
           </fu-custom>
<benben-popup v-model="popupShow1673862116532" :mask="true" :mask-close-able="false"  mode='center' >
    <!---富文本弹窗flex布局开始-->
 <view class="flex flex-direction flex-wrap align-center benben-flex-layout"    >
            <view   class='flex flex-direction flex-wrap align-center signinPagess_fd1_0'      >
        <text class='signinPagess_fd1_0_c0'  >签到规则</text>
    
    <scroll-view  class='signinPagess_fd1_0_c1'  :scroll-y='true'  >
        <view class='flex benben-scroll flex align-center'    >
                    <jyf-parser class='signinPagess_fd1_0_c1_c0'  :html="dataMessage.content | richTextFormat"  >
        </jyf-parser>
</view>
    </scroll-view>
    
</view>
<image class='signinPagess_fd1_1'  mode="aspectFit"  :src='STATIC_URL+"190.png"' @tap.stop="popupShow1673862116532=false" ></image>
</view>
        
<!---富文本弹窗flex布局结束-->
    
</benben-popup>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction align-stretch benben-flex-layout signinPagess_flex_2"    >
            <view   class='flex flex-direction align-center'      >
        <image class='signinPagess_fd2_0_c0'  mode="aspectFit"  :src='STATIC_URL+"193.png"'></image>
</view>
    <view   class='flex flex-direction flex-wrap align-center'      >
            <view   class='flex flex-direction align-center signinPagess_fd2_1_c0'      >
        <text class='signinPagess_fd2_1_c0_c0'  >{{calendar.score}}</text>
<text class='signinPagess_fd2_1_c0_c1'  >我的积分</text>
</view>
</view>
    <view   class='flex flex-direction align-stretch signinPagess_fd2_2'      >
            <view   class='flex flex-wrap align-center justify-center'      >
            <view   class='flex flex-direction align-center signinPagess_fd2_2_c0_c0'      >
        <text class='signinPagess_fd2_2_c0_c0_c0'  >已连续签到</text>
    <view   class='flex flex-wrap align-center signinPagess_fd2_2_c0_c0_c1'      >
        <text class='signinPagess_fd2_2_c0_c0_c1_c0'  >{{calendar.week_total}}</text>
<text class='signinPagess_fd2_2_c0_c0_c1_c1'  >天</text>
</view>
</view>
</view>
    <view   class='flex align-center justify-center signinPagess_fd2_2_c1'      >
            <template v-for = '(item,key0) in calendar.week_sign_info'>
    <view   class='flex align-start self-center justify-center'       :key='key0'>
            <view   class='flex flex-direction align-center'    v-if= " item.is_sign==0 && item.is_today==0"  >
            <view   class='flex align-center justify-center signinPagess_fd2_2_c1_c0_c0_c0'      >
        <text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >+</text>
<text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >{{item.integral}}</text>
</view>
<text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0==0"  >第1天</text><text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0=='1'"  >第2天</text><text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0=='2'"  >第3天</text><text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0=='3'"  >第4天</text><text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0=='4'"  >第5天</text><text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0=='5'"  >第6天</text><text class='signinPagess_fd2_2_c1_c0_c0_c1'    v-if= " key0=='6'"  >第7天</text>
</view>
    <view   class='flex flex-direction align-center'    v-if= " item.is_sign=='1' && item.is_today==0"  >
            <view   class='flex align-center justify-center signinPagess_fd2_2_c1_c0_c1_c0'      >
        <text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >+</text>
<text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >{{item.integral}}</text>
</view>
<text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0==0"  >第1天</text><text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0=='1'"  >第2天</text><text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0=='2'"  >第3天</text><text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0=='3'"  >第4天</text><text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0=='4'"  >第5天</text><text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0=='5'"  >第6天</text><text class='signinPagess_fd2_2_c1_c0_c1_c1'    v-if= " key0=='6'"  >第7天</text>
</view>
    <view   class='flex flex-direction align-center'    v-if= " item.is_sign==0 && item.is_today=='1'"  >
            <view   class='flex align-center justify-center signinPagess_fd2_2_c1_c0_c0_c0'      >
        <text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >+</text>
<text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >{{item.integral}}</text>
</view>
<text class='signinPagess_fd2_2_c1_c0_c0_c1'  >今天</text>
</view>
    <view   class='flex flex-direction align-center'    v-if= " item.is_sign=='1' && item.is_today=='1'"  >
            <view   class='flex align-center justify-center signinPagess_fd2_2_c1_c0_c1_c0'      >
        <text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >+</text>
<text class='signinPagess_fd2_2_c1_c0_c0_c0_c0'  >{{item.integral}}</text>
</view>
<text class='signinPagess_fd2_2_c1_c0_c1_c1'  >今天</text>
</view>
    <view   class='flex flex-wrap align-center signinPagess_fd2_2_c1_c0_c4'    v-if= " key0<'6'"  >
        </view>
</view>
    </template>
    
</view>
    <view   class='flex flex-wrap align-center justify-center signinPagess_fd2_2_c2'      >
        <button class='signinPagess_fd2_2_c2_c0'  @tap="signImmediatelyFunc()" v-if= " calendar.today==0" >立即签到</button><button class='signinPagess_fd2_2_c2_c0_1'   v-if= " calendar.today=='1'" >已签到</button>
</view>
</view>
</view>
        
<!---flex布局flex布局结束-->
<benben-popup v-model="popupShow1691136566156" :mask="true" :mask-close-able="false"  mode='center' >
    <!---签到成功弹窗flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch signinPagess_flex_3"    >
            <view   class='flex flex-direction flex-wrap align-stretch signinPagess_fd3_0'      >
        <image class='signinPagess_fd3_0_c0'  mode="aspectFit"  :src='STATIC_URL+"194.png"'></image>
    <view   class='flex flex-direction flex-wrap align-center signinPagess_fd3_0_c1'      >
        <text class='signinPagess_fd3_0_c1_c0'  >签到成功</text>
    <view   class='flex flex-wrap align-center signinPagess_fd3_0_c1_c1'      >
        <text   >获得</text>
<text   >{{dataBack.score}}</text>
<text   >积分</text>
</view>
</view>
</view>
    <view   class='flex flex-wrap align-center justify-center signinPagess_fd3_1'      >
        <image class='signinPagess_fd3_1_c0'  mode="aspectFit"  :src='STATIC_URL+"190.png"' @tap="popupShow1691136566156=false" ></image>
</view>
</view>
        
<!---签到成功弹窗flex布局结束-->
    
</benben-popup>
    
    
        </view>
    </view>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    export default {
        components:{},
        
        
        data(){
			return {"popupShow1691136566156":false,"popupShow1673862116532":false,"dataMessage":{"aid":"","name":"","thumb_img":"","content":"","introduce":""},"calendar":{"user_id":"","days":"","create_time":"","today":"","score":"","sign_total":"","week_sign_info":[],"total":"","per_page":"","current_page":"","last_page":"","data":[],"week_total":""},"month":"","type":"1","weekMessage":{"integral":"150","issign":"0","week_num":"3","weekList":[{"state":"1","name":"第一天","rewardPoints":"10"},{"state":"1","name":"第二天","rewardPoints":"15"},{"state":"1","name":"第三天","rewardPoints":"15"},{"state":"0","name":"第四天","rewardPoints":"20"},{"state":"0","name":"第五天","rewardPoints":"20"},{"state":"1","name":"第六天","rewardPoints":"25"},{"state":"0","name":"第七天","rewardPoints":"30"}]},"dataBack":{"status":"","days":"","date":"","score":"","empirical":"","msg":""}};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            this.getMessageFunc()
this.getcalendarFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取签到规则
                async getMessageFunc(){
                        //请求方法
    //数据验证
    
  let datadataMessage = await this.$api.get(global.apiUrls.post641568f1b6f87, {
    column_id:'13'
  });
  
  if (datadataMessage.data.code != 1) {
    this.$message.info(datadataMessage.data.msg);
    return
  } 
  let infodataMessage = datadataMessage.data;
  this.dataMessage = infodataMessage.data
  
                },
                //获取签到数据
                async getcalendarFunc(){
                        //请求方法
    //数据验证
    
  let datacalendar = await this.$api.post(global.apiUrls.post64192099543cf, {
    
  });
  
  if (datacalendar.data.code != 1) {
    this.$message.info(datacalendar.data.msg);
    return
  } 
  let infocalendar = datacalendar.data;
  this.calendar = infocalendar.data
  
                },
                //立即签到
                async signImmediatelyFunc(){
                        //请求方法
    //数据验证
    
  let datadataBack = await this.$api.post(global.apiUrls.post6419244390830, {
    type:'1'
  });
  
  if (datadataBack.data.code != 1) {
    this.$message.info(datadataBack.data.msg);
    return
  } 
  let infodataBack = datadataBack.data;
  this.dataBack = infodataBack.data
  
    this.popupShow1691136566156 = true;
                    this.getcalendarFunc()
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:url(image-path('192.png')) no-repeat,#FB5F17;background-size: 100% auto;
        }
    .signinPagess_flex_0{
        background:url(image-path('192.png')) no-repeat;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .signinPagess_fd0_0_c1_c1{
        width:36rpx;height:36rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx 0rpx 0rpx 16rpx;
    }
    .signinPagess_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:var(--benbenFontColor3);
    }
    .signinPagess_fd0_0_c0_c0{
        font-size:32rpx;font-weight:500;color:var(--benbenFontColor3);
    }
    .signinPagess_fd0_0_c0{
        width:180rpx;
    }
    .signinPagess_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .signinPagess_fd1_1{
        width:56rpx;height:56rpx;border-radius:28rpx 28rpx 28rpx 28rpx;
    }
    ::v-deep .signinPagess_fd1_0_c1_c0{
        width:480rpx;
    }
    .signinPagess_fd1_0_c1{
        touch-action:none;height:330rpx;width:480rpx;
    }
    .signinPagess_fd1_0_c0{
        font-size:36rpx;font-weight:700;color:rgba(51, 51, 51, 1);margin:40rpx 0rpx 32rpx 0rpx;
    }
    .signinPagess_fd1_0{
        background:var(--benbenbgColor1);width:560rpx;border-radius:24rpx 24rpx 24rpx 24rpx;padding:0rpx 32rpx 45rpx 32rpx;margin:0rpx 0rpx 40rpx 0rpx;background-size:100% auto !important;
    }
    .signinPagess_flex_2{
        padding:53rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd2_2_c2_c0_1{
        background:rgba(203, 209, 216, 1);border-radius:44rpx 44rpx 44rpx 44rpx;width:486rpx;line-height:88rpx;font-size:32rpx;color:#fff;height:88rpx;
    }
    .signinPagess_fd2_2_c2_c0{
        background:var(--benbenbgColor7);border-radius:44rpx 44rpx 44rpx 44rpx;width:486rpx;line-height:88rpx;font-size:32rpx;color:#fff;height:88rpx;
    }
    .signinPagess_fd2_2_c2{
        margin:16rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd2_2_c1_c0_c4{
        background:rgba(236, 236, 236, 1);margin:24rpx 2rpx 0rpx 2rpx;width:33rpx;height:2rpx;background-size:100% auto !important;
    }
    .signinPagess_fd2_2_c1_c0_c1_c1{
        margin:24rpx 0rpx 0rpx 0rpx;color:var(--benbenFontColor0);font-size:22rpx;font-weight:400;line-height:30rpx;
    }
    .signinPagess_fd2_2_c1_c0_c1_c0{
        border:2px solid var(--benbenbdColor4);background:var(--benbenbgColor7);width:50rpx;height:50rpx;border-radius:100rpx;background-size:100% auto !important;color:var(--benbenFontColor3);
    }
    .signinPagess_fd2_2_c1_c0_c0_c1{
        margin:24rpx 0rpx 0rpx 0rpx;color:#8F8F8F;font-size:22rpx;font-weight:400;line-height:30rpx;
    }
    .signinPagess_fd2_2_c1_c0_c0_c0_c0{
        font-size:20rpx;font-weight:400;
    }
    .signinPagess_fd2_2_c1_c0_c0_c0{
        border:2px solid var(--benbenbdColor4);background:rgba(191, 191, 191, 1);width:50rpx;height:50rpx;border-radius:100rpx;background-size:100% auto !important;color:var(--benbenFontColor3);
    }
    .signinPagess_fd2_2_c1{
        margin:72rpx 0rpx 72rpx 0rpx;padding:0rpx 24rpx 0rpx 24rpx;
    }
    .signinPagess_fd2_2_c0_c0_c1_c1{
        font-size:30rpx;font-weight:600;color:#333;line-height:45rpx;margin:10rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd2_2_c0_c0_c1_c0{
        font-size:60rpx;font-weight:600;color:#333;
    }
    .signinPagess_fd2_2_c0_c0_c1{
        line-height:72rpx;
    }
    .signinPagess_fd2_2_c0_c0_c0{
        color:#777777;font-size:30rpx;font-weight:400;line-height:42rpx;
    }
    .signinPagess_fd2_2_c0_c0{
        background:url(image-path('191.png')) no-repeat;background-size:100% auto !important;width:282rpx;height:232rpx;padding:104rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd2_2{
        background:#FFFFFF;margin:48rpx 32rpx 0rpx 32rpx;border-radius:24rpx 24rpx 24rpx 24rpx;padding:64rpx 0rpx 064rpx 0rpx;
    }
    .signinPagess_fd2_1_c0_c1{
        color:#FFFFFF;font-size:28rpx;font-weight:500;line-height:40rpx;margin:9rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd2_1_c0_c0{
        color:#FFFFFF;font-size:56rpx;font-weight:700;line-height:67rpx;
    }
    .signinPagess_fd2_1_c0{
        background:rgba(255, 255, 255, 0.16);padding:12rpx 83rpx 12rpx 83rpx;border-radius:24rpx 24rpx 24rpx 24rpx;
    }
    .signinPagess_fd2_0_c0{
        width:526rpx;height:49rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx 0rpx 40rpx 0rpx;
    }
    .signinPagess_flex_3{
        width:574rpx;border-radius:16rpx 16rpx 16rpx 16rpx;
    }
    .signinPagess_fd3_1_c0{
        width:48rpx;height:48rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd3_1{
        margin:48rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd3_0_c1_c1{
        color:#999999;font-size:28rpx;line-height:41rpx;font-weight:400;
    }
    .signinPagess_fd3_0_c1_c0{
        color:#333333;font-size:36rpx;font-weight:700;line-height:50rpx;margin:0rpx 0rpx 24rpx 0rpx;
    }
    .signinPagess_fd3_0_c1{
        margin:0rpx 0rpx 56rpx 0rpx;
    }
    .signinPagess_fd3_0_c0{
        width:574rpx;height:268rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .signinPagess_fd3_0{
        background:#fff;border-radius:25rpx 25rpx 25rpx 25rpx;
    }
</style>